package com.dailyblue.java.net.tcp.demo3;

import lombok.SneakyThrows;

import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class 客户端 {
    @SneakyThrows
    public static void main(String[] args) {
        Socket socket = new Socket("127.0.0.1", 9999);
        InputStream in = socket.getInputStream();
        OutputStream out = socket.getOutputStream();
        new 写入(out, "Client:").start();
        读取 t2 = new 读取(in);
        t2.setDaemon(true);
        t2.start();
    }
}
